package com.apiit.webserviceclient.activities;

import com.apiit.webserviceclient.R;
import com.apiit.webserviceclient.R.layout;
import com.apiit.webserviceclient.R.menu;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.widget.TextView;

public class Results extends Activity {
	
	TextView mod1;
	TextView grade1;
	TextView mod2;
	TextView grade2;
	TextView mod3;
	TextView grade3;
	TextView mod4;
	TextView grade4;
	TextView mod5;
	TextView grade5;
	TextView mod6;
	TextView grade6;
	TextView mod7;
	TextView grade7;
	TextView mod8;
	TextView grade8;
	
	String module1,module2,module3,module4,module5,module6,module7,module8; 
	String result1,result2,result3,result4,result5,result6,result7,result8; 
	
	

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_results);
		
		mod1 = (TextView) findViewById(R.id.txmodule1);
		mod2 = (TextView) findViewById(R.id.txtmodule2);
		mod3 = (TextView) findViewById(R.id.txtmodule3);
		mod4 = (TextView) findViewById(R.id.txtmodule4);
		mod5 = (TextView) findViewById(R.id.txtmodule5);
		mod6 = (TextView) findViewById(R.id.txtmodule6);
		mod7 = (TextView) findViewById(R.id.txtmodule7);
		mod8 = (TextView) findViewById(R.id.txtmodule8);
		
		grade1 = (TextView) findViewById(R.id.txtgrade1);
		grade2 = (TextView) findViewById(R.id.txtgrade2);
		grade3 = (TextView) findViewById(R.id.txtgrade3);
		grade4 = (TextView) findViewById(R.id.txtgrade4);
		grade5 = (TextView) findViewById(R.id.txtgrade5);
		grade6 = (TextView) findViewById(R.id.txtgrade6);
		grade7 = (TextView) findViewById(R.id.txtgrade7);
		grade8 = (TextView) findViewById(R.id.txtgrade9);
		
		Intent intename = getIntent();
		module1 = intename.getStringExtra("module1");
		module2 = intename.getStringExtra("module2");
		module3 = intename.getStringExtra("module3");
		module4 = intename.getStringExtra("module4");
		module5 = intename.getStringExtra("module5");
		module6 = intename.getStringExtra("module6");
		module7 = intename.getStringExtra("module7");
		module8 = intename.getStringExtra("module8");
		
		result1 = intename.getStringExtra("result1");
		result2 = intename.getStringExtra("result2");
		result3 = intename.getStringExtra("result3");
		result4 = intename.getStringExtra("result4");
		result5 = intename.getStringExtra("result5");
		result6 = intename.getStringExtra("result6");
		result7 = intename.getStringExtra("result7");
		result8 = intename.getStringExtra("result8");
		
		mod1.setText(module1);
		mod2.setText(module2);
		mod3.setText(module3);
		mod4.setText(module4);
		mod5.setText(module5);
		mod6.setText(module6);
		mod7.setText(module7);
		mod8.setText(module8);
		
		grade1.setText(result1);
		grade2.setText(result2);
		grade3.setText(result3);
		grade4.setText(result4);
		grade5.setText(result5);
		grade6.setText(result6);
		grade7.setText(result7);
		grade8.setText(result8);
		
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.results, menu);
		return true;
	}

}
